package jasima.engine.simulate.execute.listener;

import jasima.engine.simulate.execute.SimData;
import jasima.shopSim.core.Job;
import jasima.shopSim.core.PrioRuleTarget;
import jasima.shopSim.core.WorkStation;
import jasima.shopSim.core.WorkStationListener;

public class DefWorkStationListener implements WorkStationListener {
    private SimData simData;

    public DefWorkStationListener(SimData simData){
        this.simData = simData;
    }

    @Override
    public void operationStarted(WorkStation m, PrioRuleTarget b, int oldSetupState, int newSetupState,
                                 double setupTime) {
        assert b.numJobsInBatch() == 1;
        Job job = b.job(0);

        Double simTime = simTime();
        Double a = simTime - job.getArriveTime();
        jobTypeDelay[job.getJobType()].value(a);
    }
}
